package com.qf.dao.impl;


import com.qf.dao.MessageDao;
import com.qf.entity.Message;
import com.qf.utils.DBUtils;

import java.sql.SQLException;

public class MessageDaoImpl implements MessageDao {
    @Override
    public int addMessage(Message message) throws SQLException {
        String sql = "insert into message (card_id,detail,public_date) values(?,?,?)";
        Object[] objects = {message.getCard_id(),message.getDetail(),message.getPublic_date()};
        int num = DBUtils.DB.qr.update(sql, objects);
        return num;
    }
}
